<template>
  <!-- 模块的选择 -->
  <div class="task-model-choose">
    <cproPublic title="模块的选择（不选则默认任务涉及整个项目）">
      <functional-decomposition :project="project" :showButton="false" :isShowCheckbox="true" />
    </cproPublic>
  </div>
</template>

<script setup lang="ts">
import cproPublic from '@/components/creat-projects/cpro-public.vue'
import functionalDecomposition from '@/components/functional-decomposition/functional-decomposition.vue'
import { getProject } from '@/service/project/project'
import { ref } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
const projectId = ref(route.params.no)
const project = ref<any>(null)
const fetchProject = async () => {
  try {
    const projectResponse = await getProject(projectId.value)
    project.value = projectResponse.data
    // console.log('项目详情:', project.value)
  } catch (error) {
    console.error('获取项目详情失败', error)
  }
}
fetchProject()
</script>

<style lang="less" scoped></style>
